Skip to content

fix: show a focus outline on the copy button - #1087

Open
OmerDavidson wants to merge 1 commit into
nodejs:mainfrom
OmerDavidson:fix-copy-button-focus
Open

fix: show a focus outline on the copy button#1087
OmerDavidson wants to merge 1 commit into
nodejs:mainfrom
OmerDavidson:fix-copy-button-focus

Conversation

@OmerDavidson

@OmerDavidson OmerDavidson commented Sep 5, 2026

Copy link
Copy Markdown

the copy button was not showing it was focused. making it inaccessible to keyboard users.
before:
image
image

after:
image
image

.copy-button set outline: none unconditionally, so the code block copy button was reachable by keyboard but gave no visible indication of focus.

This drops the blanket outline: none and draws an explicit ring on :focus-visible, so it appears for keyboard users without showing up on mouse clicks. The ring uses --color-text-primary, which is already theme-aware, so it contrasts against the code block in both light and dark mode.

`.copy-button` set `outline: none` unconditionally, so the button was
reachable by keyboard but gave no visible indication of focus. Drop it and
draw an explicit ring on `:focus-visible`, using `--color-text-primary` so it
contrasts in both light and dark mode.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01THEmqTTNhxu1QbR7isfQ5M
@OmerDavidson
OmerDavidson requested a review from a team as a code owner September 5, 2026 17:27
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Sep 5, 2026 5:30pm UTC

Request Review

@OmerDavidson

Copy link
Copy Markdown
Author

Can someone trigger the ci?

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.60%. Comparing base (de3427a) to head (ac61900).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1087      +/-   ##
==========================================
- Coverage   90.60%   90.60%   -0.01%     
==========================================
  Files         217      217              
  Lines       20802    20801       -1     
  Branches     1974     1974              
==========================================
- Hits        18847    18846       -1     
  Misses       1948     1948              
  Partials        7        7              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

api-links Generator

Performance estimate (single CI run)

  • Generation time: 14.0% slower (1.21 s → 1.38 s)
  • Peak memory: 1.6% lower (357.99 MB → 352.18 MB)

legacy-html Generator

Output size: 1 file changed · net +86.00 B

File size details
File Main PR Change
assets/style.css 18.10 KB 18.18 KB +86.00 B (+0.5%)

Performance estimate (single CI run)

  • Generation time: 6.8% faster (41.61 s → 38.76 s)
  • Peak memory: 1.9% higher (2.50 GB → 2.55 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 5.4% faster (22.11 s → 20.91 s)
  • Peak memory: 3.4% higher (1.90 GB → 1.97 GB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 33.1% faster (20.97 s → 14.02 s)
  • Peak memory: 2.6% higher (1.93 GB → 1.98 GB)

orama-db Generator

Output size: 1 file changed · net -108.00 B

File size details
File Main PR Change
orama-db.json 9.36 MB 9.36 MB -108.00 B (-0.0%)

Performance estimate (single CI run)

  • Generation time: 7.5% slower (20.41 s → 21.94 s)
  • Peak memory: 0.9% lower (1.91 GB → 1.90 GB)

web Generator

Output size: 1 file changed · net +246.00 B

File size details
File Main PR Change
all.html 32.46 MB 32.46 MB +246.00 B (+0.0%)

Performance estimate (single CI run)

  • Generation time: 2.7% slower (126.59 s → 129.99 s)
  • Peak memory: 9.7% lower (5.89 GB → 5.32 GB)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants